package com.example.mvcdemo.controller;

import org.springframework.web.bind.annotation.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Li_yizYa
 * Date: 2025/7/1
 * Time: 22:06
 */

@RestController
@RequestMapping("/hello")
public class HelloController {

    @RequestMapping(value = "/print", method = RequestMethod.GET)
    public String print() {
        return "hello print";
    }

    // @GetMapping 只支持 get 请求
    @GetMapping("/print2")
    public String print2() {
        return "hello print2";
    }

    // @GetMapping 只支持 get 请求
    @PostMapping("/print3")
    public String print3() {
        return "hello print3";
    }

}
